# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Logging.V2.Model.UpdateBucketRequest do
  @moduledoc """
  The parameters to UpdateBucket.

  ## Attributes

  *   `bucket` (*type:* `GoogleApi.Logging.V2.Model.LogBucket.t`, *default:* `nil`) - Required. The updated bucket.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Required. The full resource name of the bucket to update. "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket"
  *   `updateMask` (*type:* `String.t`, *default:* `nil`) - Required. Field mask that specifies the fields in bucket that need an update. A bucket field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.For a detailed FieldMask definition, see: https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=retention_days
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :bucket => GoogleApi.Logging.V2.Model.LogBucket.t() | nil,
          :name => String.t() | nil,
          :updateMask => String.t() | nil
        }

  field(:bucket, as: GoogleApi.Logging.V2.Model.LogBucket)
  field(:name)
  field(:updateMask)
end

defimpl Poison.Decoder, for: GoogleApi.Logging.V2.Model.UpdateBucketRequest do
  def decode(value, options) do
    GoogleApi.Logging.V2.Model.UpdateBucketRequest.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Logging.V2.Model.UpdateBucketRequest do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
